<#--
* Textbox
-->
<#macro Textbox path labelText=path type="text" display="layui-input-block" class=""  maxlength=0  required="" value="" prompt="" unit="" aux="" attributes="">
  <@spring.bind path/>
  <#assign id="${spring.status.expression?replace('[','')?replace(']','')}">
  <#assign placeholder = (prompt?has_content)?string(prompt,labelText?replace("<font[^>]*>([^<]*)</font>","","ri")) >
  <div class="layui-form-item">
    <label class="layui-form-label" for="${id}">
        <#if required?contains("required")><b style="color:red;padding:2px;vertical-align: middle;">*</b></#if>${labelText}
    </label>
    <div class="${display}">
        <#if unit?has_content>
             <div class="input-group">
                <input type="${type}" id="${id}" autocomplete="off" placeholder="请输入${placeholder}"
                    class="layui-input ${class} <#if maxlength!=0>limited</#if>"  style="min-width:190px;"
                    <#if maxlength!=0>maxlength=${maxlength}</#if> name="${spring.status.expression}" 
                    <#if value=="">value="${spring.stringStatusValue}"<#else>value="${value}"</#if> 
                    lay-verify="${required}" lay-verType="tips" lay-reqText="请填写${placeholder}" ${attributes}>
                 <span class="input-group-addon">${unit}</span>
             </div>
        <#else>
            <input type="${type}" id="${id}"  autocomplete="off" placeholder="请输入${placeholder}"
                class="layui-input ${class} <#if maxlength!=0>limited</#if>" style="min-width:220px;"
                <#if maxlength!=0>maxlength=${maxlength}</#if> name="${spring.status.expression}" 
                <#if value=="">value="${spring.stringStatusValue}"<#else>value="${value}"</#if>
                lay-verify="${required}" lay-verType="tips" lay-reqText="请填写${placeholder}" ${attributes}>
        </#if>
        <#nested>
    </div>
    <#if aux?has_content><div class="layui-form-mid layui-word-aux" style="margin-left:30px;">${aux}</div></#if>
  </div>
</#macro>

<#macro TextboxQuery path labelText=path type="text" maxlength=0 class="" value="" attributes="">
  <@spring.bind path/>
  <#assign id="${spring.status.expression?replace('[','')?replace(']','')}">
  <#assign placeholder = labelText?replace("<font[^>]*>([^<]*)</font>","","ri") >
     <div class="layui-form-item margin-5">
        <label class="layui-form-label" for="${id}">${labelText}</label>
        <div class="layui-input-inline">
            <input type="${type}" id="${id}" autocomplete="off" placeholder="请输入${placeholder}"
                class="layui-input width-190 ${class} <#if maxlength!=0>limited</#if>"  
                <#if maxlength!=0>maxlength=${maxlength}</#if> name="${spring.status.expression}" 
                <#if value=="">value="${spring.stringStatusValue}"<#else>value="${value}"</#if> ${attributes}>
        </div>
    </div>
</#macro>
